package br.com.merks.controller;

import org.apache.log4j.Logger;

import br.com.caelum.vraptor.Path;
import br.com.caelum.vraptor.Post;
import br.com.caelum.vraptor.Resource;
import br.com.caelum.vraptor.Result;
import br.com.caelum.vraptor.Validator;
import br.com.merks.model.Conf;
import br.com.merks.service.ConfService;
@Resource
public class ConfController {
	private Validator validator = null;
	private Result result = null;
	private ConfService confService;
	public static final Logger logger = Logger.getLogger(ConfController.class);
	
	public ConfController(ConfService confService, Result result, Validator validator) {
	    this.validator = validator;
	 
	    this.result = result;
	    this.confService = confService;
		}
	
	@Path(priority = 1, value = "/conf/form")
	public void form() {
		
	}
	@Post
	@Path(priority = 1, value = "/conf/add")
	public void add(Conf conf) {
		
		this.confService.saveConf(conf);
	}
}
